package fhp.hlhj.giantfold.presenter

import fhp.hlhj.giantfold.interfaces.ISuperMarkt
import fhp.hlhj.giantfold.javaBean.ErroBean
import fhp.hlhj.giantfold.javaBean.TypesBean
import fhp.hlhj.giantfold.module.SuperMarketModule

/**
 * author: FHP
 * data: on 2017\12\4 0004 16:05
 * E-Mail: 103945089@qq.com
 */
class SuperMarketPresenter(private val iSuperMarkt: ISuperMarkt) : SuperMarketModule.IsOverListener {
    override fun error(erroBean: ErroBean) {
        iSuperMarkt.onError(erroBean)
    }

    override fun showloading() {
        iSuperMarkt.showLoading()
    }

    override fun over(typesBean: TypesBean) {
        iSuperMarkt.getTypes(typesBean)
    }
    private  val superMarketModule:SuperMarketModule= SuperMarketModule()
    fun getTypes(){
        superMarketModule.getTypes(this)
    }
}